FROM openjdk:8-jdk
MAINTAINER tsq "tsq@qq.com"
COPY target/file-center.jar /app.jar
# 同步时间
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' > /etc/timezone
RUN sh -c 'touch /app.jar'
VOLUME /tmp
EXPOSE 5000

ENV JAVA_OPTS=""
ENV BACKEND_SERVICE="oap:11800"

#ENV JAVA_OPTS="-Dspring.profiles.active=test"
ENTRYPOINT [ "sh", "-c", "java -javaagent:/opt/agent/skywalking-agent.jar \
-Dskywalking.agent.service_name=file-center \
-Dskywalking.collector.backend_service=$BACKEND_SERVICE \
$JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]